<%@ page language="java" contentType="text/html; charset=UTF-8"
         pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>

<%@ page import="artaza.persistencia.*"%>
<%@ page import="java.util.List"%>




<html>
    <head>
        <link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
        <script type="text/javascript" src="JQuery/js/prototype.js"></script>
        <script language="javascript" src="JQuery/js/jquery-1.3.min.js"></script>
        <script type="text/javascript" src="JQuery/js/scriptaculous.js?load=effects,builder"></script>
        <script type="text/javascript" src="JQuery/js/lightbox.js"></script>
        <link href="/css/style.css" rel="stylesheet" type="text/css" />
        <script type="text/javascript"  language="Javascript">
            function error(){
            <c:if test="${error_log}">
                    alert("Usuario o contraseña incorrecto.");
            </c:if>
                }
        </script>

    </head>
    <h1>
        <form action="/portada.html" method="post">
            <input type="image" src="/stylesheets/fondo_pagina.png">
        </form>

    </h1>
    <body onload="error();" style="background-image:url('/stylesheets/fondofincas.jpg');">
        <h1><center>REGISTRO</center></h1>
<div id="centrado">
        <table>
            <tr>
                <td>
                    <form action="/nuevo_usuario" method="post">
                        <fieldset>
                            <legend><b>Nuevo usuario</b></legend>
                            <table>
                                <tr>
                                    <td>Usuario:</td>
                                    <td><input name="username" type="text" size="10"/></td>

                                </tr>
                                <tr>
                                    <td>Contraseña:</td>
                                    <td><input name="password" type="password" size="10"/></td>
                                </tr>
                            </table>
                        </fieldset>
                        <fieldset>
                            <legend><b>Información del usuario</b></legend>
                            <table>
                                <tr>
                                    <td>*Nombre:</td>
                                    <td><input name="nombre" type="text"></td>

                                </tr>
                                <tr>
                                    <td> *Apellidos:</td>
                                    <td><input type ="text" name="apellidos"</td>
                                </tr>
                                <tr>
                                    <td>Teléfono:</td>
                                    <td> <input type="text" name="telefono"></td>
                                </tr>
                                <tr>
                                    <td>*Correo Electrónico:</td>
                                    <td><input type="text" name="correo"></td>
                                </tr>
                                <tr>
                                    <td>Dni:</td>
                                    <td><input type="text" name="dni"></td>
                                </tr>

                            </table>
                            <br>
                            (*Campos obligatorios)    <input type="submit" value="Enviar">
                            
                        </fieldset>

                    </form>
                </td>
                
            </tr>
        </table>
    </div>
    <div id="centrado2">
         <table>
            <tr>
                <td>


                    <fieldset>
                        <legend><b>¿Ya estás registrado?</b></legend>
                        <form action="/login" method="get">
                            <table>
                                <tr>
                                    <td>Usuario:</td>
                                    <td><input name="username" type="text" size="10" value="pepe"/></td>

                                </tr>
                                <tr>
                                    <td>Contraseña:</td>
                                    <td><input name="password" type="password" size="10" value="pepe"/></td>
                                    <td> <center><input type="submit" value="Entrar"></center></td>
                                </tr>

                            </table>

                        </form>
                    </fieldset>
                </td>
         </table>
               </div>









    </body>
</html>
